<?php
class Form_AvatarEdit extends Zend_Form
{

    public function __construct () {
        $this->setName('form_avatar_edit');
        $this->setAttrib('enctype', 'multipart/form-data');
        parent::__construct();
        $image = new Zend_Form_Element_File('avatar');
        $image->setLabel(
            'Logo type')
            ->addValidator('Size', false, 102400)
            ->addValidator('Extension', false, 'jpg,png,gif')
            ->setRequired(true);
        
        $submit = new Zend_Form_Element_Submit('Change');
        $submit->setLabel('Submit');
        
        $this->addElements(array($image, $submit));
    }
}
?>
